<script>
    
$(document).ready(function() {  
    $( ".register" ).click(function() { 
         var url = $(this).attr('url');  //  alert($(this).attr('rel'));     
         $('#txtEmployeeId').val($(this).attr('rel'));    
         $('#txtApplyDateOld').val('');   
         $('#frmCompanyCode').attr('action', url); // alert(this).attr('rel'));
         $( "#frmCompanyCode" ).submit();   
         //console.log($(this).attr('rel1'));
       
    });
    //
    $( ".useritem" ).click(function() { 
         var url = $(this).attr('url');   // alert($(this).attr('rel'));     
         $('#txtEmployeeId').val($(this).attr('rel'));    
         $('#frmCompanyCode').attr('action', url);          
         $( "#frmCompanyCode" ).submit();   
       
    });
    //
    $( ".edit" ).click(function() { 
         var url = $(this).attr('url');  //  alert($(this).attr('rel'));     
         $('#txtEmployeeId').val($(this).attr('rel'));    
         $('#txtApplyDateOld').val($(this).attr('rel1'));    
         $('#frmCompanyCode').attr('action', url);  
         $( "#frmCompanyCode" ).submit(); 
         console.log($(this).attr('rel1'));
       
    });    
 }); 
</script>

<form id="frmCompanyCode" action="" method="POST">
  <input type="hidden" id="txtEmployeeId" name="txtEmployeeId">      
  <input type="hidden" id="txtApplyDateOld" name="txtApplyDateOld">      
</form>

<div id="main_content">
	<h3>List Employee Leave Information</h3> 
    <div class="form_search" style="width:500px;">
    <table width="500">
    	<tr>
        <td >
    	<form>
        	<label>Employee name: </label> <label><a href="" style="text-decoration:underline">Cat Hoang Long</a></label>
            <input type="reset"  value="reset"  class="reset"  />
            <input type="submit" name="submit" value="search" class="search" />            
        </form>
        </td>
        </tr>
    </table>
    </div>
    <a href="<?php echo base_url();?>leave-info/add" class="new_regis">New register</a>    
    <div class="table_list">
		<?php
           echo "<label for='disabledSelect' style='color:red;'>".$this->session->flashdata('message')."</label>";
        ?>
    	<table width="100%" border="0"  class="list_view_data" cellpadding="0" cellspacing="0">
            <tr align="center">
                <th>No.</th>
                <th>Employee Name</th>
                <th>Year</th>
                <th>Available leave</th>
                <th>Action</th>
            </tr>
            <tr>
            	<td align="center" width="50">1</td>
                <td align="left" width="150"><a href="" style="text-decoration:underline;">Cat Hoang Long</a></td>
                <td align="center" width="50">2014</td>
                <td align="center">14</td>
                <td align="center">
                	<img src="<?php echo base_url();?>public/sites/images/Pencil.png" width="15" />
                </td>
            </tr>
            <tr>
            	<td align="center" width="50">1</td>
                <td align="left" width="150"><a href="" style="text-decoration:underline;">Pham Sy Hoang</a></td>
                <td align="center" width="50">2014</td>
                <td align="center">12</td>
                <td align="center">
                	<img src="<?php echo base_url();?>public/sites/images/Pencil.png" width="15" />
                </td>
            </tr>
            <tr>
            	<td align="center" width="50">1</td>
                <td align="left" width="150"><a href="" style="text-decoration:underline;">Nguyen Van Quyet</a></td>
                <td align="center" width="50">2014</td>
                <td align="center">12</td>
                <td align="center">
                	<img src="<?php echo base_url();?>public/sites/images/Pencil.png" width="15" />
                </td>
            </tr>                                     
        </table>
    </div>
    <div class="h_pagination">
    	<a href="">< Prev</a>
        <a href="" class="h_pagination_active">1</a>
        <a href="">2</a>
        <a href="">3</a>
        <a href="">Next ></a>
    </div>
</div>